package com.bbznb.controller;

import com.bbznb.common.Result;
import com.bbznb.service.UserService;
import com.bbznb.util.OrderQueryDTO;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

@RestController
@RequestMapping("/api/user/orders")
public class OrderController {
    @Autowired
   private UserService userService;
    @GetMapping
    public Result getOrders( OrderQueryDTO orderQueryDTO) {
        return  Result.build(200, "success", userService.getOrders(orderQueryDTO)) ;
    }

}
